<?php 
$this->Html->addCrumb('Reply', $this->Html->url(array('controller'=>'tickets','action'=>'customer_reply')));
?>
<div id="content">

	<!--  start page-heading -->
	<div id="page-heading">
		<h1>General Enquiry Tickets</h1>
	</div>
	<?php echo $this->Session->flash(); ?>
	<!-- end page-heading -->

	<table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
	<tr>
		<th rowspan="3" class="sized">
        <?php echo $this->Html->image('/images/shared/side_shadowleft.jpg', array('width' => '20', 'height' => '300', 'alt' => '')); ?>
    </th>
		<th class="topleft"></th>
		<td id="tbl-border-top">&nbsp;</td>
		<th class="topright"></th>
		<th rowspan="3" class="sized">
        <?php echo $this->Html->image('/images/shared/side_shadowright.jpg', array('width' => '20', 'height' => '300', 'alt' => '')); ?>
    </th>
	</tr>
	<tr>
		<td id="tbl-border-left"></td>
		<td>
		<!--  start content-table-inner ...................................................................... START -->
		<div id="content-table-inner">
		
			<!--  start table-content  -->
			<div id="table-content">

<?php echo $this->Form->create('TicketMessage', array('url' => array('controller' => 'tickets', 'action' => 'customer_reply'), 'class' => 'form')); ?>
    		<table border="0" cellpadding="0" cellspacing="0"  id="id-form">
               <?php echo $this->Form->input('ticket_id', array('type' => 'hidden')); ?>
              <?php echo $this->Form->input('from', array('type' => 'hidden', 'value' => 'user')); ?>
              <?php echo $this->Form->input('name', array('type' => 'hidden', 'value' => "$username")); ?>
              <?php echo $this->Form->input('sla', array('type' => 'hidden', 'value' => $tickets['Ticket']['sla'])); ?>
          		<tr>
          			<th valign="top">Subject:</th>
          			<td><?php echo $this->data['TicketMessage']['subject']; ?>
          <?php
              echo $this->Form->input('subject', array('type' => 'hidden'));     
          ?>      
                </td>
          			<td></td>
          		</tr>
          		<tr>
          			<th valign="top">Content:</th>
          			<td>
<?php echo $this->Html->script('tiny_mce/tiny_mce'); ?>
<script type="text/javascript">
// O2k7 skin
tinyMCE.init({
        // General options
        mode : "exact",
        elements : "TicketMessageContent",
        theme : "advanced",
        skin : "o2k7",
        width : "600",
        plugins : "safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",

        // Theme options
        theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
        theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
        theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
        theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_statusbar_location : "bottom",
        theme_advanced_resizing : true,

        // Example content CSS (should be your site CSS)
        content_css : "/emstraining/css/admin/screen.css",

        // Drop lists for link/image/media/template dialogs
        template_external_list_url : "/emstraining/js/tiny_mce/plugins/template/editor_plugin.js",
        external_link_list_url : "js/link_list.js",
        external_image_list_url : "js/image_list.js",
        media_external_list_url : "/emstraining/js/tiny_mce/plugins/media/editor_plugin.js",

        // Replace values for the template plugin
        template_replace_values : {
                username : "Some User",
                staffid : "991234"
        }
});
</script>

          <?php
              echo $this->Form->input('content', array(
                                  'label'     => false,
                                  'div'       => false,
                                  'class'     => 'form-textarea')
                  );     
          ?>      
                </td>
          			<td></td>
          		</tr>
            	<tr>
            		<th>&nbsp;</th>
            		<td valign="top">
                    <?php echo $this->Form->submit('Submit', array('class' => 'form-submit')); ?>
             		</td>
            		<td></td>
            	</tr>
           </table>
<?php echo $this->Form->end(); ?>
			
      </div>
			<!--  end content-table  -->
		

			<div class="clear"></div>
		 
		</div>
		<!--  end content-table-inner ............................................END  -->
		</td>
		<td id="tbl-border-right"></td>
	</tr>
	<tr>
		<th class="sized bottomleft"></th>
		<td id="tbl-border-bottom">&nbsp;</td>
		<th class="sized bottomright"></th>
	</tr>
	</table>
	<div class="clear">&nbsp;</div>

</div>

<style>
.table-header-options a, .table-header-repeat a{
    background: none;
}
</style>

